<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    function fn(){
        var a = 10
        a++
        console.log(a)
    }
    fn()
    fn()
    


    function box(){
        var a = 10;
        return function (){
            a++
            console.log(a)
        }
    }

    

    var f = box();

    f()
    f()
    f()
    f()





</script>
</html>